package com.example.test.advice.第三章_类_对象_方法.建议50_使用packageinfo类为包服务;

import java.lang.annotation.Annotation;

public class Client {

    public static void main(String[] args) {
        Package pkg = Package.getPackage("com.example.test.advice.第三章_类_对象_方法.建议50_使用packageinfo类为包服务");
        Annotation[] annotations = pkg.getAnnotations();

        for(Annotation an : annotations) {
            if(an instanceof PkgAnnotation) {
                System.out.println("我是一个PkgAnnotation注解");
            }
        }
    }
}
